export function adaptive(max, min) {
  max = parseFloat(max);
  min = parseFloat(min);
  let m = (max - min) / 2 + max;
  let n = min - ((max - min) / 2);
  n = min > 0 && n < 0 ? 0 : n;
  let interval = Math.ceil((m - n) / 4 / 5) * 5;
  let Min = Math.floor(n / 5) * 5;
  // let interval = Math.ceil((max - min) / 4 / 5) * 5;
  // let Min = Math.floor(min / 5) * 5;
  return {
    max: Min + interval * 5,
    min: Min,
    interval,
  };
}
